home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / JSplitPane$AccessibleJSplitPane.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  2.0 KB  |  57 lines

  1. package javax.swing;
  2.  
  3. import javax.accessibility.AccessibleRole;
  4. import javax.accessibility.AccessibleState;
  5. import javax.accessibility.AccessibleStateSet;
  6. import javax.accessibility.AccessibleValue;
  7.  
  8. public class JSplitPane$AccessibleJSplitPane extends JComponent.AccessibleJComponent implements AccessibleValue {
  9.    // $FF: synthetic field
  10.    private final JSplitPane this$0;
  11.  
  12.    protected JSplitPane$AccessibleJSplitPane(JSplitPane var1) {
  13.       super(var1);
  14.       this.this$0 = var1;
  15.    }
  16.  
  17.    public AccessibleRole getAccessibleRole() {
  18.       return AccessibleRole.SPLIT_PANE;
  19.    }
  20.  
  21.    public AccessibleStateSet getAccessibleStateSet() {
  22.       AccessibleStateSet var1 = super.getAccessibleStateSet();
  23.       if (this.this$0.getOrientation() == 0) {
  24.          var1.add(AccessibleState.VERTICAL);
  25.       } else {
  26.          var1.add(AccessibleState.HORIZONTAL);
  27.       }
  28.  
  29.       return var1;
  30.    }
  31.  
  32.    public AccessibleValue getAccessibleValue() {
  33.       return this;
  34.    }
  35.  
  36.    public Number getCurrentAccessibleValue() {
  37.       return new Integer(this.this$0.getDividerLocation());
  38.    }
  39.  
  40.    public Number getMaximumAccessibleValue() {
  41.       return new Integer(this.this$0.getUI().getMaximumDividerLocation(this.this$0));
  42.    }
  43.  
  44.    public Number getMinimumAccessibleValue() {
  45.       return new Integer(this.this$0.getUI().getMinimumDividerLocation(this.this$0));
  46.    }
  47.  
  48.    public boolean setCurrentAccessibleValue(Number var1) {
  49.       if (var1 instanceof Integer) {
  50.          this.this$0.setDividerLocation(var1.intValue());
  51.          return true;
  52.       } else {
  53.          return false;
  54.       }
  55.    }
  56. }
  57.